cmake_minimum_required(VERSION 3.4.1)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNO_CRYPTO")

add_library( # Sets the name of the library.
        wlpush

        # Sets the library as a shared library.
        SHARED

        # Provides a relative path to your source file(s).
        wlpush.cpp
        WlQueue.cpp
        RtmpPush.cpp
        WlCallJava.cpp

        librtmp/amf.c
        librtmp/hashswf.c
        librtmp/log.c
        librtmp/parseurl.c
        librtmp/rtmp.c

        )
add_library( # Sets the name of the library.
             yuvengine
             # Sets the library as a shared library.
             SHARED
        YuvOperateJni.cpp
             yuvengine/yuvengine.cpp)

find_library( # Sets the name of the path variable.
        log-lib

        # Specifies the name of the NDK library that
        # you want CMake to locate.
        log)

target_link_libraries( # Specifies the target library.
                       yuvengine
                       ${log-lib} )
target_link_libraries( # Specifies the target library.
        wlpush

        ${log-lib})